home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / dlgwrite.pxl < prev    next >
Text File  |  2000-12-23  |  18KB  |  449 lines

  1. {    Filename    :     dlgwrite.pxl
  2.      Purpose    :    Dialog box selection + creation
  3.     Date        :    March 22, 2000
  4.     Author        :    Stewart DIBBS, VYSOR
  5. History:
  6.  
  7.     Version    :  4.40    RELEASE
  8.     Update        :  
  9.     Date        :  
  10.  
  11. --------------------------------------------------------------------------}
  12. Initialize: {only one instance allowed}
  13.     UseCoordinates(PIXEL)
  14.     Title$ = "PiXCL Dialog Code Writer"                                  
  15.     WinExist(Title$,Res)
  16.     If Res = 0 Then Goto One_Instance
  17.     Beep
  18.     WinSetActive(Title$,Res)
  19.     WinShow(Title$,RESTORE,Res)
  20.     End
  21. One_Instance:
  22.     UseCaption(Title$) {change the title}
  23.     WinLocate(Title$,591,145,808,344,Res)                
  24.     UseBackground(TRANSPARENT,255,255,255)     
  25.     WinShow(Title$,TOPMOST,Res) 
  26.     DrawBackGround
  27.     DirGet(SourceDir$) {used later for library function calls}  
  28.  
  29.     {DragAcceptFile(ENABLE,AcceptFile)}
  30.     AutoProgressBar(DISABLE)
  31.  
  32.     InfoMenu(REMOVE)
  33.     WaitInput(100)
  34.     SetMenu("&File",IGNORE,
  35.         "&New",CreatingFile,
  36.         "&Open",OpeningFile,
  37.         "&Save",SavingFile,
  38.         SEPARATOR,
  39.         "E&xit!",Terminate,
  40.         ENDPOPUP,
  41.         "&View",IGNORE,
  42.         "&ToolBar",ViewToolBar,
  43.         "&StatusBar",ViewStatusBar,
  44.         ENDPOPUP,
  45.         "&Information",IGNORE,
  46.         "&Concept",Concept,
  47.         "&Help",ShowAppHelp,
  48.         SEPARATOR,
  49.         "&About",About,
  50.         ENDPOPUP)
  51.  
  52.     GoSub MakeToolbar
  53.     ChangeMenuItem("&ToolBar",CHECK,TBRes)
  54.         
  55.     StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
  56.     DrawStatusWinText(0,"Ready")
  57.     ChangeMenuItem("&StatusBar",CHECK,SBRes)
  58.  
  59.     GoSub SetUpCodeFragments
  60.         
  61.  
  62.     
  63. Wait_for_Input:
  64.     WaitInput()
  65.  
  66. Terminate:
  67.     End
  68.  
  69.  
  70. Concept:
  71.     MessageBox(OK,1,INFORMATION,
  72. "This is a skeleton of a PiXCL application.  You could briefly
  73. describe your application's function here, or provide some
  74. basic help information.",
  75.     "PiXCL Skeleton Concept",Res)
  76.  
  77.     Goto Wait_for_Input
  78.  
  79. ShowAppHelp:
  80.     {An application Help file usually has the same name as the application.}
  81.     Winhelp("dlgwrite.hlp",CONTENTS,"")
  82.  
  83.     Goto Wait_for_Input
  84.  
  85. About:
  86.     AboutUser("PiXCL Dialog Code Writer",  { or substitute Title$}
  87.       "Two lines of text goes here e.g. Application function.",
  88.     "Four Lines of additional information goes here, perhaps contact information and Web addresses")   
  89.  
  90.     Goto Wait_for_Input
  91.  
  92. ViewToolBar:
  93.     GetMenuStatus("&ToolBar",CHECKED,Res)
  94.     If Res = 0
  95.         GoSub MakeToolbar
  96.         ChangeMenuItem("&ToolBar",CHECK,Res)
  97.     Else
  98.         Toolbar()
  99.         ChangeMenuItem("&ToolBar",UNCHECK,Res)
  100.     Endif
  101.     Goto Wait_for_Input
  102.  
  103. ViewStatusBar:
  104.     GetMenuStatus("&StatusBar",CHECKED, Res)
  105.     If Res = 0
  106.         StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
  107.         DrawStatusWinText(0,"Ready")
  108.         ChangeMenuItem("&StatusBar",CHECK,Res)
  109.     Else
  110.         StatusWindow(DISABLE,BOTTOM,2,200,-1,0,0)
  111.        ChangeMenuItem("&StatusBar",UNCHECK,Res)
  112.     Endif
  113.     Goto Wait_for_Input
  114.  
  115. CreatingFile:
  116.     WaitInput(1)
  117.     List$ = "FileGet|FileSave|ChooseColor|ChooseFont|TextBox|ListBox|"
  118.     DialogBox(15,10,155,140,"Create dialogbox code",CAP_NCTR, 5,5,32,32,ICON11,
  119.              105, 8,138,23,"&Test",14, Res,  {0 = test dialog}
  120.              105,28,138,43,BTN,PUSH,"&Copy", { 1 = OK}
  121.              105,48,138,63,BTN,PUSH,"&Cancel", {2 = Cancel}
  122.              20,0,101,60,BTN,GROUP,"Common Dialogs",
  123.              25,10,100,18,BTN,AUTORADIO,"FileGet dialog",State1,
  124.              25,20,100,28,BTN,AUTORADIO,"FileSave dialog",State2,
  125.              25,30,100,38,BTN,AUTORADIO,"ChooseColor STD",State3a,
  126.              25,40,100,48,BTN,AUTORADIO,"ChooseColor FULL",State3b,
  127.              25,50,100,58,BTN,AUTORADIO,"ChooseFont dialog",State4,
  128.  
  129.              20,65,101,128,BTN,GROUP,"Custom Dialogs",
  130.              25,75,100,83,BTN,AUTORADIO,"Number dialog",State5,
  131.              25,85,100,93,BTN,AUTORADIO,"Coordinate dialog",State6,
  132.              25,95,100,103,BTN,AUTORADIO,"RGB triplet dialog",State7,             
  133.              25,105,100,113,BTN,AUTORADIO,"Listing dialog",State8,
  134.              25,115,100,123,BTN,AUTORADIO,"UserIDPassword",State9)             
  135.  
  136.     If Res = 0 { we want to test the dialog, new Res is returned}
  137.         If State1 = 1 Then GoSub TestFileGetCode
  138.         If State2 = 1 Then GoSub TestFileSaveAsCode
  139.         If State3a = 1 Then GoSub TestChooseColorCode1
  140.         If State3b = 1 Then GoSub TestChooseColorCode2
  141.         If State4 = 1 Then GoSub TestChooseFontCode
  142.  
  143.         Fdx1 = 30 Fdy1 = 30
  144.         If State5 = 1 Then FunctionDialogTitle$ = "Enter a number" GoSub ShowFunctionDialog1
  145.         If State6 = 1 Then FunctionDialogTitle$ = "Enter a coordinate" GoSub ShowFunctionDialog2
  146.         If State7 = 1 Then FunctionDialogTitle$ = "Enter an RGB triplet" GoSub ShowFunctionDialog3
  147.         If State8 = 1 Then GoSub ShowListingControl 
  148.         If State9 = 1 Then GoSub ShowUserIDPassword
  149.     Endif
  150.     
  151.     If Res = 0 Then Goto CreatingFile
  152.  
  153.     If Res = 1
  154.         If State1 = 1 Then ClipboardPut(FileGetCode$,Res) State1 = 0
  155.         If State2 = 1 Then ClipboardPut(FileSaveAsCode$,Res) State2 = 0
  156.         If State3a = 1 Then ClipboardPut(ChooseColorCode1$,Res) State3a = 0
  157.         If State3b = 1 Then ClipboardPut(ChooseColorCode2$,Res) State3b = 0
  158.         If State4 = 1 Then ClipboardPut(ChooseFontCode$,Res) State4 = 0
  159.         If State5 = 1 Then ClipboardPut(FunctionDialog1Code$,Res) State5 = 0
  160.         If State6 = 1 Then ClipboardPut(FunctionDialog2Code$,Res) State6 = 0
  161.         If State7 = 1 Then ClipboardPut(FunctionDialog3Code$,Res) State7 = 0
  162.         If State8 = 1 Then ClipboardPut(ListingControlCode$,Res) State8 = 0
  163.         If State9 = 1 Then ClipboardPut(UserIDPasswordCode$,Res) State9 = 0
  164.     Endif
  165.  
  166.     Goto Wait_for_Input
  167.  
  168. OpeningFile:
  169.     WaitInput(1)
  170.     {TODO: add file handling here}
  171.     MessageBox(OK,1,INFORMATION,"No operations coded for this button.",
  172.                     "Opening File",Res)
  173.     Goto Wait_for_Input
  174.  
  175. SavingFile:
  176.     WaitInput(1)
  177.     {TODO: add file handling here}
  178.     MessageBox(OK,1,INFORMATION,"No operations coded for this button.",
  179.                     "Saving File",Res)
  180.     Goto Wait_for_Input
  181.  
  182. PrintingFile:
  183.     WaitInput(1)
  184.     {TODO: add file handling here}
  185.     MessageBox(OK,1,INFORMATION,"No operations coded for this button.",
  186.                     "Printing File",Res)
  187.     Goto Wait_for_Input
  188.  
  189. AcceptFile:
  190.     GetDragList(FileList$)
  191.     {TODO: add file list handling here, or delete this whole label handler}
  192.     Goto Wait_for_Input
  193.     
  194. {--- Style Suggestion: place all subroutines at the end of the script.}
  195.  
  196. MakeToolbar: {subroutine}
  197.     Toolbar(    RAISED, PXL_SMALL,
  198.         NULL, NULL, SEPARATOR, "", Wait_for_Input, 
  199.         PXL_NEW, ENABLED, STD, "FileNew", CreatingFile,
  200.         PXL_OPEN, ENABLED, STD, "FileOpen", OpeningFile, 
  201.         PXL_SAVE, ENABLED, STD, "FileSave", SavingFile, 
  202.         PXL_PRINT,  ENABLED, STD,"PrintFile", PrintingFile, 
  203.         NULL, NULL, SEPARATOR, "", Wait_for_Input, 
  204.         HELPINFO, ENABLED, STD,"Show Help",ShowAppHelp) 
  205.  
  206.     Return
  207.  
  208. SetUpCodeFragments:
  209.     Chr(9,tab$) Chr(10,cr$) Chr(34,qt$)
  210.     FileGetCode$ = tab$ + "Filter$ = All Files (*.*),*,*" + CR$ +
  211.             tab$ + "Label$ = " + qt$ + "Select a file to open" + qt$ + cr$ +
  212.                      tab$ + "InitFile$ = " + qt$ + "*.*" + qt$ + cr$ + 
  213.                      tab$ + "InitDir$ = SourceDir$" + cr$ +
  214.             tab$ + "FileGet(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR,ChosenFile$)" + cr$
  215.  
  216.     FileSaveAsCode$ = tab$ + "Filter$ = All Files (*.*),*,*" + CR$ +
  217.             tab$ + "Label$ = " + qt$ + "Select a file to save" + qt$ + cr$ +
  218.                      tab$ + "InitFile$ = " + qt$ + "*.*" + qt$ + cr$ + 
  219.                      tab$ + "InitDir$ = SourceDir$" + cr$ +
  220.             tab$ + "FileSaveAs(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR,ChosenFile$)" + cr$
  221.  
  222.  
  223.     ChooseColorCode1$ = tab$ + "DlgTitle$ = " + qt$ + qt$ + "{fill in title}"+ cr$ + 
  224.             tab$ + "Basic$ = " + qt$ + qt$ + "{fill in string}"+cr$ +
  225.             tab$ + "Custom$ = " + qt$ + qt$ + "{fill in string}"+cr$ +
  226.             tab$ + "ChooseColor(STD,Red,Green,Blue,X,Y,DlgTitle$,Basic$,Custom$)"
  227.  
  228.     ChooseColorCode2$ = tab$ + "DlgTitle$ = " + qt$ + qt$ + "{fill in title}"+ cr$ + 
  229.             tab$ + "Basic$ = " + qt$ + qt$ + "{fill in string}"+cr$ +
  230.             tab$ + "Custom$ = " + qt$ + qt$ + "{fill in string}"+cr$ +
  231.             tab$ + "ChooseColor(FULL,Red,Green,Blue,X,Y,DlgTitle$,Basic$,Custom$)"
  232.  
  233.  
  234.     ChooseFontCode$ = tab$ + "ChooseFont(Font$,Width,Height,r,g,b,Bold,Italic,Underline,Strikeout)" + cr$
  235.     UseFontExCode$ = tab$ + "UseFontExt(Font$,Width,Height,Bold,Italic,Underline,Strikeout,r,g,b)" + cr$
  236.     UseFontCode$ = tab$ + "UseFont(Font$,Width,Height,NOBOLD,NOITALIC,NOUNDERLINE,r,g,b)" + cr$
  237.  
  238.  
  239.     FunctionDialog1Code$ = tab$ + "Fdx1 = <x>  Fdy1 = <y> {set the X,Y coordinates} " + cr$ +
  240.         tab$ + "FunctionDialogTitle$ = " + qt$ + "<dialog title>" + qt$ + cr$ + cr$ + 
  241.         "{Move this subroutine to a suitable location, or delete it if already inserted}" + cr$ + 
  242.         "ShowFunctionDialog1: {subroutine: one numeric input }" + cr$ + 
  243.         tab$ + "Fdx2 = Fdx1 + 150" + cr$ +
  244.         tab$ + "Fdy2 = Fdy1 + 50" + cr$ + 
  245.         tab$ + "DialogBox(Fdx1, Fdy1,Fdx2,Fdy2,FunctionDialogTitle$,CAP_NCTR," + cr$ + 
  246.         tab$ + tab$ + "5,15,24,24,QUESTION," + cr$ + 
  247.         tab$ + tab$ + "110,25,145,40," + qt$ + "&Cancel" + qt$ + ",4,FDRes,  {returns 0}" + cr$ + 
  248.         tab$ + tab$ + "110,5,145,20,BTN,PUSH," + qt$ + "&OK" + qt$ + ",  {returns 1}" + cr$ + 
  249.         tab$ + tab$ + "20,5,105,45,BTN,GROUP," + qt$ + "Numeric Input" + qt$ + ", {edit string}" + cr$ + 
  250.         tab$ + tab$ + "48,23,100,33,STATIC,LEFT," + qt$ + "Input value" + qt$ + ", {edit string}" + cr$ + 
  251.         tab$ + tab$ + "25,17,45,27,EDIT,NUMBER,InputValue$,InputValue$}" + cr$ + 
  252.         tab$ + "Return" + cr$
  253.  
  254.     FunctionDialog2Code$ = tab$ + "Fdx1 = <x>  Fdy1 = <y> {set the X,Y coordinates}" + cr$ +
  255.         tab$ + "FunctionDialogTitle$ = " + qt$ + "<dialog title>" + qt$ + cr$ + cr$ + 
  256.         "{Move this subroutine to a suitable location, or delete it if already inserted}" + cr$ + 
  257.         "ShowFunctionDialog2: {subroutine: two numeric inputs}"+ cr$ + 
  258.         tab$ + "Fdx2 = Fdx1 + 150" + cr$ +
  259.         tab$ + "Fdy2 = Fdy1 + 50" + cr$ + 
  260.         tab$ + "DialogBox(Fdx1, Fdy1,Fdx2,Fdy2,FunctionDialogTitle$,CAP_NCTR, "+ cr$ + 
  261.         tab$ + tab$ + "5,15,24,24,QUESTION," + cr$ + 
  262.         tab$ + tab$ + "110,25,145,40," + qt$ + "&Cancel" + qt$ + ",6,FDRes,  {returns 0}"+ cr$ + 
  263.         tab$ + tab$ + "110,5,145,20,BTN,PUSH," + qt$ +"&OK"+ qt$ +",  {returns 1}"+ cr$ + 
  264.         tab$ + tab$ + "20,5,105,45,BTN,GROUP," + qt$ + "Numeric Input"+ qt$ + ", {edit string}"+ cr$ + 
  265.         tab$ + tab$ + "48,17,100,27,STATIC,LEFT," + qt$ + "High range value"+ qt$ + ", {edit string}"+ cr$ + 
  266.         tab$ + tab$ + "25,17,45,27,EDIT,NUMBER,HiRange$,HiRange$,"+ cr$ + 
  267.         tab$ + tab$ + "48,29,100,39,STATIC,LEFT," + qt$ + "Low range value"+ qt$ + ", {edit string}"+ cr$ + 
  268.         tab$ + tab$ + "25,29,45,39,EDIT,NUMBER,LoRange$,LoRange$) "+ cr$ + 
  269.         tab$ + "Return" + cr$
  270.  
  271.  
  272.  
  273.     FunctionDialog3Code$ = tab$ + "Fdx1 = <x>  Fdy1 = <y> {set the X,Y coordinates}" + cr$ +
  274.         tab$ + "FunctionDialogTitle$ = " + qt$ + "<dialog title>" + qt$ + cr$ + cr$ + 
  275.         "{Move this subroutine to a suitable location, or delete it if already inserted}" + cr$ + 
  276.         "ShowFunctionDialog3: {subroutine: three numeric inputs}" + cr$ +
  277.         tab$ + "Fdx2 = Fdx1 + 150" + cr$ +
  278.         tab$ + "Fdy2 = Fdy1 + 65" + cr$ + 
  279.         tab$ + "DialogBox(Fdx1, Fdy1,Fdx2,Fdy2,FunctionDialogTitle$,CAP_NCTR,"+ cr$ + 
  280.         tab$ + tab$ + "5,15,24,24,QUESTION,"+ cr$ + 
  281.         tab$ + tab$ + "110,35,145,50," + qt$ + "&Cancel" + qt$ + ",8,FDRes,  {returns 0}"+ cr$ + 
  282.         tab$ + tab$ + "110,15,145,30,BTN,PUSH," + qt$ + "&OK" + qt$ + ",  {returns 1}"+ cr$ + 
  283.         tab$ + tab$ + "20,5,105,55,BTN,GROUP," + qt$ + "Numeric Input" + qt$ + " , {edit string}"+ cr$ + 
  284.         tab$ + tab$ + "48,17,100,27,STATIC,LEFT," + qt$ + "High range value" + qt$ + " , {edit string}"+ cr$ + 
  285.         tab$ + tab$ + "25,17,45,27,EDIT,NUMBER,HiRange$,HiRange$,"+ cr$ + 
  286.         tab$ + tab$ + "48,29,100,39,STATIC,LEFT," + qt$ + "Mid range value" + qt$ + " , {edit string}"+ cr$ + 
  287.         tab$ + tab$ + "25,29,45,39,EDIT,NUMBER,MidRange$,MidRange$,"+ cr$ + 
  288.         tab$ + tab$ + "48,41,100,51,STATIC,LEFT," + qt$ + "Low range value" + qt$ + " , {edit string}"+ cr$ + 
  289.         tab$ + tab$ + "25,41,45,51,EDIT,NUMBER,LoRange$,LoRange$)"+ cr$ + 
  290.         tab$ + "Return"+ cr$
  291.  
  292.     ListingControlCode$ = tab$ + "Fdx1 = <x>  Fdy1 = <y> {set the X,Y coordinates}" + cr$ +
  293.         "{Move this subroutine to a suitable location, or delete it if already inserted}" + cr$ + 
  294.         "ShowListingControl: {subroutine}" + cr$ + 
  295.         tab$ + "Fdx2 = Fdx1 + 210" + cr$ + 
  296.         tab$ + "Fdy2 = Fdy1 + 160" + cr$ + 
  297.         tab$ + "Msg$ = " + qt$ + "Fill this string with the initial text, eg with FileRead_ASCII" + qt$ + cr$ + 
  298.         tab$ + "DialogBox(Fdx1,Fdy1,Fdx2,Fdy2," + qt$ + "Edit Control Dialog Box" + qt$ + ", CAP_NCTR, " + cr$ + 
  299.         tab$ + tab$ + "15,25, 48,48, ICON01, " + cr$ + 
  300.         tab$ + tab$ + "30,145,80,158," + qt$ + "&Cancel" + qt$ + ", 2, Res," + cr$ + 
  301.         tab$ + tab$ + "130,145,180,158,BTN, PUSH," + qt$ +"&OK,"  + qt$  + cr$ + 
  302.         tab$ + tab$ + "  5,5,205,143,EDIT,MLSTRING,Msg$,Res2$)" + cr$ + 
  303.         tab$ + "Return" + cr$
  304.  
  305.  
  306.  
  307.  
  308.  
  309.     UserIDPasswordCode$ = tab$ + "Fdx1 = <x>  Fdy1 = <y> {set the X,Y coordinates}" + cr$ +
  310.         "{Move this subroutine to a suitable location, or delete it if already inserted}" + cr$ + 
  311.         "ShowUserIDPassword: {subroutine}" + cr$ + 
  312.         tab$ + "Fdx2 = Fdx1 + 230" + cr$ + 
  313.         tab$ + "Fdy2 = Fdy1 + 90" + cr$ + 
  314.         tab$ + "Msg$ = " + qt$ + "Please enter your UserID and Password" + qt$  + cr$ + 
  315.         tab$ + "Info$ = " + qt$ + "Information" + qt$ +  cr$ + 
  316.         tab$ + "MoreInfo$ = " + qt$ + "<insert desired instruction string>" + qt$  + cr$ + 
  317.         tab$ + "DialogBox(Fdx1,Fdy1,Fdx2,Fdy2," + qt$ + "UserID and Password Entry" + qt$ + ", CAP_NCTR," + cr$ + 
  318.         tab$ + tab$ + "350,110, 64,64, WINLOGO, " + cr$  + 
  319.         tab$ + tab$ + "170,15,220,30," + qt$ + "&Cancel" + qt$ + ",   6,   Res, {returns 0}" + cr$ + 
  320.         tab$ + tab$ + "170,35,220,50,BTN,PUSH," + qt$ + "&OK" + qt$  + ", {returns 1}" + cr$ + 
  321.         tab$ + tab$ + "25,2,165,18,STATIC, LEFT, Msg$ ," + cr$ + 
  322.         tab$ + tab$ + " 4,17,160,30,EDIT,STRING," + qt$ + qt$ + ",UserID$," + cr$ + 
  323.         tab$ + tab$ + " 4,37,160,50,EDIT,PASSWORD," + qt$ + qt$ + ",Pwd$," + cr$ + 
  324.         tab$ + tab$ + " 4,52,160,88,BTN,GROUP,Info$," + cr$ + 
  325.         tab$ + tab$ + " 6,60,158,87,STATIC,LEFT,MoreInfo$)" + cr$ + 
  326.     tab$ + "Return" + cr$ 
  327.  
  328.  
  329.     Return
  330.  
  331.  
  332. TestFileGetCode:
  333.     Filter$ = "All Files (*.*),*,*" 
  334.     Label$ = "Select a file to open"
  335.     InitFile$ =  "*.*" 
  336.     InitDir$ = SourceDir$
  337.     FileGet(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR,ChosenFile$)
  338.     Res = 1    
  339.     If ChosenFile$ = "" Then Res = 0
  340.         
  341.     Return
  342.  
  343. TestFileSaveAsCode:
  344.     Filter$ = "All Files (*.*),*,*" 
  345.     Label$ = "Select a file to save"
  346.     InitFile$ =  "*.*" 
  347.     InitDir$ = SourceDir$
  348.     FileSaveAs(Filter$,InitFile$,InitDir$,Label$,CHANGEDIR,ChosenFile$)
  349.     Res = 1    
  350.     If ChosenFile$ = "" Then Res = 0
  351.     Return
  352.  
  353. TestChooseColorCode1:
  354.     Basic$ = "" {fill in string}
  355.     Custom$ = "" {fill in string}
  356.     ChooseColor(STD,Red,Green,Blue,X,Y,DlgTitle$,Basic$,Custom$)
  357.     Res = 1
  358.     If Red = -1 Then Res = 0
  359.     Return
  360.  
  361. TestChooseColorCode2:
  362.     Basic$ = "" {fill in string}
  363.     Custom$ = "" {fill in string}
  364.     ChooseColor(FULL,Red,Green,Blue,X,Y,DlgTitle$,Basic$,Custom$)
  365.     Res = 1
  366.     If Red = -1 Then Res = 0
  367.     Return
  368.  
  369. TestChooseFontCode:
  370.     ChooseFont(Font$,Width,Height,r,g,b,Bold,Italic,Underline,Strikeout)
  371.     Res = 1
  372.     If Font$ = "" Then Res = 0
  373.     Return
  374.  
  375. ShowFunctionDialog1: {subroutine: one numeric input }
  376.     Fdx2 = Fdx1 + 150
  377.     Fdy2 = Fdy1 + 50
  378.     DialogBox(Fdx1, Fdy1,Fdx2,Fdy2,FunctionDialogTitle$,CAP_NCTR,
  379.         5,15,24,24,QUESTION,
  380.         110,25,145,40,"&Cancel",4,Res,  {returns 0}
  381.         110,5,145,20,BTN,PUSH,"&OK",  {returns 1}
  382.         20,5,105,45,BTN,GROUP,"Numeric Input", {edit string}
  383.         48,23,100,33,STATIC,LEFT,"Input value", {edit string}
  384.         25,17,45,27,EDIT,NUMBER,InputValue$,InputValue$)
  385.     Return
  386.  
  387.  
  388. ShowFunctionDialog2: {subroutine: two numeric inputs}
  389.     Fdx2 = Fdx1 + 150
  390.     Fdy2 = Fdy1 + 50
  391.     DialogBox(Fdx1, Fdy1,Fdx2,Fdy2,FunctionDialogTitle$,CAP_NCTR,
  392.         5,15,24,24,QUESTION,
  393.         110,25,145,40,"&Cancel",6,Res,  {returns 0}
  394.         110,5,145,20,BTN,PUSH,"&OK",  {returns 1}
  395.         20,5,105,45,BTN,GROUP,"Numeric Input", {edit string}
  396.         48,17,100,27,STATIC,LEFT,"High range value", {edit string}
  397.         25,17,45,27,EDIT,NUMBER,HiRange$,HiRange$,
  398.         48,29,100,39,STATIC,LEFT,"Low range value", {edit string}
  399.         25,29,45,39,EDIT,NUMBER,LoRange$,LoRange$)
  400.     Return
  401.  
  402.  
  403. ShowFunctionDialog3: {subroutine: three numeric inputs}
  404.     Fdx2 = Fdx1 + 150
  405.     Fdy2 = Fdy1 + 65
  406.     DialogBox(Fdx1, Fdy1,Fdx2,Fdy2,FunctionDialogTitle$,CAP_NCTR,
  407.         5,15,24,24,QUESTION,
  408.         110,35,145,50,"&Cancel",8,Res,  {returns 0}
  409.         110,15,145,30,BTN,PUSH,"&OK",  {returns 1}
  410.         20,5,105,55,BTN,GROUP,"Numeric Input", {edit string}
  411.         48,17,100,27,STATIC,LEFT,"High range value", {edit string}
  412.         25,17,45,27,EDIT,NUMBER,HiRange$,HiRange$,
  413.         48,29,100,39,STATIC,LEFT,"Mid range value", {edit string}
  414.         25,29,45,39,EDIT,NUMBER,MidRange$,MidRange$,
  415.         48,41,100,51,STATIC,LEFT,"Low range value", {edit string}
  416.         25,41,45,51,EDIT,NUMBER,LoRange$,LoRange$)
  417.     Return
  418.  
  419. ShowListingControl: {subroutine}
  420.     Fdx2 = Fdx1 + 210
  421.     Fdy2 = Fdy1 + 160
  422.     Msg$ = "Fill this string with the initial text, eg with FileRead_ASCII"
  423.  
  424.     DialogBox(Fdx1,Fdy1,Fdx2,Fdy2,"Edit Control Dialog Box", CAP_NCTR,
  425.                15,25, 48,48, ICON01, 
  426.               30,145,80,158,"&Cancel", 2, Res,
  427.               130,145,180,158,BTN, PUSH,"&OK",
  428.               5,5,205,143,EDIT,MLSTRING,Msg$,Res2$)
  429.  
  430.     Return
  431.  
  432. ShowUserIDPassword: {subroutine}
  433.     Fdx2 = Fdx1 + 230
  434.     Fdy2 = Fdy1 + 90
  435.     Msg$ = "Please enter your UserID and Password"
  436.     Info$ = "Information"
  437.     MoreInfo$ = "User IDs and Passwords are automatically checked by the Server. Once verified you will be logged into your secure user account."
  438.     DialogBox(Fdx1,Fdy1,Fdx2,Fdy2,"Custom Password Box using DialogBox command", CAP_NCTR,
  439.                350,110, 64,64, WINLOGO, 
  440.                170,15,220,30,"&Cancel", 6, Res, {returns 0}
  441.                170,35,220,50,BTN,PUSH,"&OK", {returns 1}
  442.                 25,2,165,18,STATIC, LEFT, Msg$ ,
  443.                 4,17,160,30,EDIT,STRING,"",UserID$,
  444.                 4,37,160,50,EDIT,PASSWORD,"",Pwd$,
  445.                 4,52,160,88,BTN,GROUP,Info$,
  446.                 6,60,158,87,STATIC,LEFT,MoreInfo$)
  447.  
  448.     Return
  449.